  <script>
  $(document).ready(function() {
    $("#date_created").datepicker();
    $('#preview').lightBox();
  });
  </script>
<div class="center grid_2 error" >
<?php 
	echo $this->display->errorStr;
?>
</div>
<?php 
if( !empty($uploaderrors)){ foreach ($uploaderrors as $error )  {?>
<p class='error' >
	<?php echo $error?>
</p>
<?php } }?>
<div class="grid_2 nicebutton aligncenter">
<a href="<?php
	if( !empty( $imgdata) ){
		echo 'uploads/'.$imgdata['file_name'];
	}
?>" title="<?php
	if( !empty( $imgdata) ){
		echo $imgdata['file_name'];
	}
?>" id="preview">
<img src='<?php
	if( !empty( $imgdata) ){
		echo 'uploads/'.$imgdata['thumb'];
	}
?>' 
width='<?php if( !empty( $imgdata) ){
		echo $imgdata['thumb_width'];
	}
?>'

/>
</a>
</div>
<?php
$attributes = array('class' => '', 'id' => 'imageuploadform');
$hidden = array('submitted' => true );
echo form_open($form_address, $attributes,$hidden); ?>
	<div class="grid_2 nicebutton">
		<div class="grid_2 alignleft niceform" >Title <span class="req">*</span></div>
		<div class="grid_2 clearleft" >
		<input type="hidden" name="categories" ID="categories" value="<?php echo($currentCat!=NULL)?$currentCat:''; ?>" />
		<input type="text" size="25" id="title" class="niceform <?php if( getError( $errors,'title') )echo 'error';?>" name="title"  value="<?php echo set_value('title'); ?>"/>  
		</div>
		<div class="grid_2 clearleft alignleft niceform" >Short Description</div>
		<div class="grid_2 clearleft" >
		<textarea class="niceform" cols="25" id="short_description" name="short_description"  ><?php echo set_value('short_description'); ?></textarea>
		</div>
	</div>
<div class="grid_2 alignright nicebutton margin_top20" >
<input type="submit" name="cancel" value="Cancel" />
<input type="submit" value="Accept" />
</div>
 
</form>